using Microsoft.VisualBasic;
using System;
using System.Collections;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Windows.Forms;
using System.Reflection;//JMR -- added for AssemblyName.Name
using Microsoft.VisualBasic.ApplicationServices;

namespace ePlanSysOman
{
  public sealed partial class AboutBox1
  {
    private void  // ERROR: Handles clauses are not supported in C#
AboutBox1_Load(System.Object sender, System.EventArgs e)
    {
      // Set the title of the form.
      string ApplicationTitle;

      //JMR -- changed My.Application.Info.Title to Application.ProductName
      if (Application.ProductName != "")
      {
          ApplicationTitle = Application.ProductName;
      } else {
        //ApplicationTitle = System.IO.Path.GetFileNameWithoutExtension(My.Application.Info.AssemblyName);
        ApplicationTitle = System.IO.Path.GetFileNameWithoutExtension(System.Reflection.Assembly.GetExecutingAssembly().GetName().Name);//JMR replaced above line with this line
      }
      this.Text = string.Format("About {0}", ApplicationTitle);
      // Initialize all of the text displayed on the About Box.
      // TODO: Customize the application's assembly information in the "Application" pane of the project 
      //    properties dialog (under the "Project" menu).
      this.LabelProductName.Text = Application.ProductName;//JMR -- changed My.Application.Info.Title to Application.ProductName
      //this.LabelVersion.Text = string.Format("Version {0}", My.Application.Info.Version.ToString);
      this.LabelVersion.Text = string.Format("Version {0}", Application.ProductVersion).ToString();//JMR -- Replaced above line with this and convert it to string
      //this.LabelCopyright.Text = My.Application.Info.Copyright;
      this.LabelCopyright.Text = AssemblyInfo.AssemblyCopyright;//JMR -- Replaced the above line with this one
      //this.LabelCompanyName.Text = My.Application.Info.CompanyName;
      this.LabelCompanyName.Text = Application.CompanyName;//JMR -- Replaced the above line with this one
      //this.TextBoxDescription.Text = My.Application.Info.Description;
      this.TextBoxDescription.Text = ((System.Reflection.AssemblyDescriptionAttribute)System.Reflection.Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(System.Reflection.AssemblyDescriptionAttribute), false)[0]).Description;//JMR -- Replaced above line with this one
    }

    private void  // ERROR: Handles clauses are not supported in C#
OKButton_Click(System.Object sender, System.EventArgs e)
    {
      this.Close();
    }

  }
}

